<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="utf-8"/>
</head>
<body>
<form name="form1" method="POST" action="LoginForm.php">    
    <label for="emp_email">E-mail</label><input type="email" name="emp_email" id="emp_email"> <br />
    <label for="emp_senha">Senha</label><input type="password" name="emp_senha" id="emp_senha"> <br />
    
    <input type="submit" value="cadastrar" />

</form>
    
    
    <?php 
	if ($_SERVER['REQUEST_METHOD']=='POST'){
            include 'Login.php';
            include 'LoginDAO.php';
            $form = array();
            foreach( $_POST as $campo => $vlr){                
                $form[$campo] = $vlr;
            }
            
            $login    = new Login($form['emp_email'], hash('sha512',$form['emp_senha']));
            $loginDAO = new LoginDAO();
            
            $testa=$loginDAO->Login($login);
          
          
            header('Location: emp.php');
            
            
            
            
        }